import request from "@/utils/request";

// 查询账单列表
export function listBill(query) {
  return request({
    url: "/business/bill/list",
    method: "get",
    params: query,
  });
}

// 查询账单所有列表
export function listAllBill(query) {
  return request({
    url: "/business/bill/listAll",
    method: "get",
    params: query,
  });
}

// 查询账单详细
export function getBill(id) {
  return request({
    url: "/business/bill/getInfo/" + id,
    method: "get",
  });
}

// 新增账单
export function addBill(data) {
  return request({
    url: "/business/bill/add",
    method: "post",
    data: data,
  });
}

// 修改账单
export function updateBill(data) {
  return request({
    url: "/business/bill/edit",
    method: "post",
    data: data,
  });
}

// 删除账单
export function delBill(id) {
  return request({
    url: "/business/bill/remove/" + id,
    method: "get",
  });
}

// 查询账单列表详情
export function listDetail(query) {
  return request({
    url: "/business/billDetail/list",
    method: "get",
    params: query,
  });
}

// 批量修改账单
export function xgBill(id) {
  return request({
    url: "/business/billDetail/updateDetail/" + id,
    method: "get",
  });
}

//首页数据
export function indexBill(query) {
  return request({
    url: "/business/approve/getAmountInfo",
    method: "get",
    params: query,
  });
}
